<!DOCTYPE html>
<html>
	<head>
	<meta name="renderer" content="webkit" />
	<meta http-equiv="X-UA-COMPATIBLE" content="IE=edge,chrome=1"/>
	<meta charset="UTF-8">
	{if $frist_menu.module_name=='首页'}
	<title>{$title_name} - 商家管理</title>
	{else /}
		<title>{$title_name} - {$frist_menu.module_name}管理</title>
	{/if}
		<link rel="shortcut icon" type="image/x-icon" href="ADMIN_IMG/admin_icon.ico" media="screen"/>
		<link rel="stylesheet" type="text/css" href="__STATIC__/bootstrap/css/bootstrap.css" />
		<link rel="stylesheet" type="text/css" href="__STATIC__/bootstrap/css/bootstrap-responsive.css" />
		<link rel="stylesheet" type="text/css" href="__STATIC__/css/common.css" />
		<link rel="stylesheet" type="text/css" href="__STATIC__/css/font-awesome.min.css" />
		<link rel="stylesheet" type="text/css" href="__STATIC__/css/seller_center.css" />
		<link rel="stylesheet" type="text/css" href="__STATIC__/simple-switch/css/simple.switch.three.css" />
		<style>
		.wrapper{width:1318px;}
		.help-block{color:red;}
		.ncsc-admin-info{cursor: pointer;}
		.ncsc-path a{text-decoration:none;}
		.is-upgrade{width: 7px;height: 7px;background: red;border-radius: 50%;position: absolute;z-index: 5;bottom: 9px;display: none;}
		.modal-header:hover{cursor: move;}
		</style>
		<script src="__STATIC__/js/jquery-1.8.1.min.js"></script>
<!-- 		<script src="__STATIC__/bootstrap/js/bootstrap.js"></script> -->
		<script src="__STATIC__/blue/bootstrap/js/bootstrap.js"></script>
		<script src="__STATIC__/bootstrap/js/bootstrapSwitch.js"></script>
		<script src="__STATIC__/simple-switch/js/simple.switch.js"></script>
		<script src="__STATIC__/js/jquery.unobtrusive-ajax.min.js"></script>
		<script src="__STATIC__/js/common.js"></script>
		<script src="__STATIC__/js/seller.js"></script>
		<script src="__STATIC__/js/load_task.js"></script>
		<script src="__STATIC__/js/load_bottom.js" type="text/javascript"></script>
		<script src="ADMIN_JS/jquery-ui.min.js"></script>
		<script src="ADMIN_JS/ns_tool.js"></script>
	</head>
<body>
<header class="ncsc-head-layout">
	<div class="wrapper">
		<div class="ncsc-admin">
			<div class="ncsc-admin-headimg">
			{if condition="$user_headimg neq ''"}
				<img src="{:__IMG($user_headimg)}"/>
			{else /}
				<img src="__STATIC__/images/default_user_portrait.gif"/>
			{/if}
			</div>
			<span class="user-name ncsc-admin-info" data-toggle="dropdown">{$user_name}</span>
			<a class="ncsc-admin-a ncsc-admin-info" data-toggle="dropdown"><i class="ncsc-admin-i ncsc-admin-down"></i></a>
			<a class="ncsc-admin-a h40"><i class="ncsc-admin-line"></i></a>
			<a class="ncsc-admin-a" href="{:url('SHOP_MAIN')}" target="_blank"><i class="ncsc-admin-i ncsc-admin-home"></i></a>
			<a class="ncsc-admin-a" href="{:url('ADMIN_MAIN/login/logout')}" title="安全退出管理中心"><i class="ncsc-admin-i ncsc-admin-off"></i></a>
			<div class="user-operation dropdown-menu">
				<a href="javascript:;" title="修改密码" onclick="editpassword()"><i class="fa fa-wrench"></i>修改密码</a>
				<a href="javascript:;" title="更新缓存" onclick="delcache()"><i class="fa fa-send"></i>更新缓存</a>
			</div>
		</div>
		<div class="center-logo">
			<a href="{:url('ADMIN_MAIN')}"><img src="ADMIN_IMG/shop_logo.png"/></a>
		</div>
		<div class="index-search-container" style="position: relative;">
			<div class="index-sitemap" onclick="nav_open()">
				<a href="javascript:void(0);">导航管理<i class="icon-angle-down"></i></a>
				<div class="sitemap-menu" style="display: none; z-index: 1000;">
					<div class="title-bar" onclick="nav_close()">
						<h2>
							<i class="icon-sitemap"></i>管理导航<em></em>
						</h2>
						<span id="closeSitemap" class="close">X</span>
					</div>
					<div id="quicklink_list" class="content">
						{foreach name="nav_list" item="nav"}
						<dl>
							<dt>{$nav.data.module_name}</dt>
							{foreach name="nav['sub_menu']" item="nav_sub"}
							<dd>
								<a href="{:url('ADMIN_MAIN/'.$nav_sub['url'])}"> {$nav_sub.module_name}</a>
							</dd>
							{/foreach}
						</dl>
						{/foreach}
					</div>
				</div>
			</div>
			<div class="search-bar">
				<input type="hidden" name="act" value="search" /> 
				<input type="text" id="search_goods" name="keyword" placeholder="商品搜索" class="search-input-text" />
				<input type="submit" class="search-input-btn pngFix" onclick="search()" value="" />
			</div>
		</div>
		<nav class="ncsc-nav">
			{foreach name="headlist" item="per"}
			{if condition="strtoupper($per['module_id']) eq $headid"}
			<dl class="current_nav" onmouseover="add_nav_class(this)" onmouseout="remove_nav_class(this)">
				<dt>
					<a href="{:url('ADMIN_MAIN/'.$per['url'])}">{$per.module_name}</a>
					{if condition="$per['module_id'] eq 10000"}
						<span class="is-upgrade"></span>
					{/if}
				</dt>
				<dd class="arrow"></dd>
			</dl>
			{else /}
			<dl onmouseover="add_nav_class(this)" onmouseout="remove_nav_class(this)">
				<dt>
					<a href="{:url('ADMIN_MAIN/'.$per['url'])}">{$per.module_name}</a>
					{if condition="$per['module_id'] eq 10000"}
						<span class="is-upgrade"></span>
					{/if}
				</dt>
			</dl>
			{/if}
			{/foreach}
		</nav>
	</div>
</header>

<!-- 左边菜单的加载 -->
<div class="MAIN" style="min-height: 94vh;">
	{block name="menu"}
	<div class="LEFT">
		<div id="accordion2" class="accordion leftmenu">
			<div class="accordion-group">
				<div class="sidebarX">
					{if condition="$frist_menu.module_picture != ''"}
					<img src="{:__IMG($frist_menu.module_picture)}" />
					{else/}
					<img src="__STATIC__/images/admin_left_logo.png" />
					{/if}
					<h2>{$frist_menu.module_name}</h2>
				</div>
				<div class="accordion-body collapse in" id="collapseOne">
					<ul class="nav nav-pills nav-stacked" id="left_menu-small">
						{foreach name="leftlist" item="leftitem"}
						{if condition="strtoupper($leftitem['module_id']) eq $second_menu_id"}
						<li class="active"><h1></h1><a href="{:url('ADMIN_MAIN/'.$leftitem['url'])}">{$leftitem.module_name}</a></li>
						{else /}
						<li><a href="{:url('ADMIN_MAIN/'.$leftitem['url'])}">{$leftitem.module_name}</a></li>
						{/if}
						{/foreach}
					</ul>
				</div>
			</div>
		</div>
	</div>
	{/block}
	<!-- 右边主要内容的加载 -->
	<div class="RIGHT">
		<div class="ncsc-path">
			<a href="{:url('ADMIN_MAIN')}"><i class="icon-desktop"></i>{$title_name}</a>
			{if condition="$frist_menu.module_name != ''"}
			<i class="icon-angle-right"></i>
			<a href="{:url('ADMIN_MAIN/'.$frist_menu['url'])}">{$frist_menu.module_name}</a>
			{/if}
			{if condition="$secend_menu.module_name != ''"}
			<i class="icon-angle-right"></i>
				<!-- 需要加跳转链接用这个：ADMIN_MAIN/{$secend_menu.url} -->
				<a href="javascript:;">{$secend_menu.module_name}</a>
			{/if}
		</div>
		<!--顶部边框开始  -->
		<div class="tabmenu">
			<ul class="tab pngFix">
				{foreach name="child_menu_list" item="child_menu" key="k" }
				{eq name="child_menu['active']" value="1"}
				<li class="active"><a href="{:url('ADMIN_MAIN/'.$child_menu['url'])}">{$child_menu.menu_name}</a></li>
				{else/}
				<li class="daohang_no"><a href="{:url('ADMIN_MAIN/'.$child_menu['url'])}">{$child_menu.menu_name}</a></li>
				{/eq}
				{/foreach}
			</ul>
			<div class="right_side_operation">
				<ul>
					{block name="right_tab"}
					<li><a class="nscs-table-handle_green" href="javascript:;" style="display: none;">右侧按钮测试</a></li>
					{/block}
				</ul>
			</div>
		</div>
		<hr class="tabmenu_hr" style="border:1px solid #00C0FF;margin:0 0px 10px 20px;"  />
		<div class="main">
			{block name="main"}{/block}
		</div>

		
		<!-- 公共的操作提示弹出框 common-success：成功，common-warning：警告，common-error：错误，-->
		<div class="common-tip-message js-common-tip">
			<div class="inner"></div>
		</div>
	</div>
</div>

<!--修改密码弹出框 -->
<div id="edit-password" class="modal hide" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
	<div class="modal-header">
		<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
		<h3 id="myModalLabel">修改密码</h3>
	</div>
	<div class="modal-body">
		<form class="form-horizontal">
			<div class="control-group">
				<label class="control-label" for="inputPassword"><span class="color-red">*</span>原密码</label>
				<div class="controls">
					<input type="password" id="pwd0" placeholder="请输入原密码" />
					<span class="help-block"></span>
				</div>
			</div>
			<div class="control-group">
				<label class="control-label" for="inputPassword"><span class="color-red">*</span>新密码</label>
				<div class="controls">
					<input type="password" id="pwd1" placeholder="请输入新密码" />
					<span class="help-block"></span>
				</div>
			</div>
			<div class="control-group">
				<label class="control-label" for="inputPassword"><span class="color-red">*</span>再次输入密码</label>
				<div class="controls">
					<input type="password" id="pwd2" placeholder="请输入确认密码" />
					<span class="help-block"></span>
				</div>
			</div>
			<div style="text-align: center; height: 20px;" id="show"></div>
		</form>
	</div>
	<div class="modal-footer">
		<button class="btn btn-info" onclick="submitPassword()"  style="display:inline-block;">保存</button>
		<button class="btn" data-dismiss="modal" aria-hidden="true">关闭</button>
	</div>
</div>

<!--修改密码弹框结束  -->
<div class="footer">
	<div id="faq" style="background: #eee; padding-top: 10px;">
		<div class="faq-wrapper"></div>
	</div>
	<div id="footer" class="wrapper">
		<p>
			{foreach name="ShopNavigationData" id="vo" key='key'}
			{if $key>0} |{/if} 
				{if condition='$vo.nav_type eq 0'}
					{if condition='$vo.is_blank eq 1'}
						<a target="_blank" href="{:url('SHOP_MAIN/'.$vo['nav_url'])}"  title="{$vo.nav_title}">{$vo.nav_title}</a>
					{else/}
						<a href="{:url('SHOP_MAIN/'.$vo['nav_url'])}"  title="{$vo.nav_title}">{$vo.nav_title}</a>
					{/if}
				{else/}
					{if condition='$vo.is_blank eq 1'}
						<a target="_blank" href="{$vo.nav_url}"  title="{$vo.nav_title}">{$vo.nav_title}</a>
					{else/}
						<a href="{$vo.nav_url}"  title="{$vo.nav_title}">{$vo.nav_title}</a>
					{/if}
				{/if}
			{/foreach}
		</p>
		<p style="color:#333333;" id="bottom_copyright">
			<span id="copyright_meta"></span>
			<br>
			<a href="http://www.niushop.com.cn" target="_blank" style="text-decoration: none;color:#333333;" id="copyright_companyname"></a>
			<span id="copyright_desc"></span>
		</p>
	</div>
</div>

<script src="ADMIN_JS/ns_common_base.js"></script>
<script>
$(function(){
	
	$('.index-sitemap > a').bind("click", function() {
		$(".sitemap-menu-arrow").slideDown("slow");
		$(".sitemap-menu").slideDown("slow");
	});
	$('.add-quickmenu > a').bind("click", function() {
		$(".sitemap-menu-arrow").slideDown("slow");
		$(".sitemap-menu").slideDown("slow");
	});
	$('#closeSitemap').bind("click", function() {
		$(".sitemap-menu-arrow").slideUp("fast");
		$(".sitemap-menu").slideUp("fast");
	});
});
function add_nav_class(doc) {
	$(doc).addClass("hover");
}

function remove_nav_class(doc) {
	$(doc).removeClass("hover");
}

// 显示导航管理
function nav_open() {
	var one = new Array();
	var two = new Array();
	var three = new Array();
	$(".ncsc-head-layout .sitemap-menu dl").each(function(c, e) {
		if (c < 5) {
			one.push($(e).height());
		} else if (c > 4 && c < 10) {
			two.push($(e).height());
		} else if (c > 9 && c < 15) {
			three.push($(e).height());
		}
	})
	$(".ncsc-head-layout .sitemap-menu dl").each(function(c, e) {
		if (c < 5) {
			var one_max_height = Math.max.apply(Math, one);
			$(e).height(one_max_height);
		} else if (c > 4 && c < 10) {
			var two_max_height = Math.max.apply(Math, two);
			$(e).height(two_max_height);
		} else if (c > 9 && c < 15) {
			var three_max_height = Math.max.apply(Math, three);
			$(e).height(three_max_height);
		}
	})
	$(".sitemap-menu-arrow").show();
	$(".sitemap-menu").show();
}
// 隐藏导航管理
function nav_close() {
	$(".sitemap-menu-arrow").hide();
	$(".sitemap-menu").hide();
}
// 系统注销菜单的控制
var closetimer = 0;
function exitSystemOver() {
	cancelColseMenu();
	$("#exit_System").css("display", "block");
};

function exitSystemOut() {
	closetimer = window.setTimeout(mclose, 600);
};

function cancelColseMenu() {
	window.clearTimeout(closetimer);
	closetimer = null;
};

function mclose() {
	$("#exit_System").css("display", "none");
}
</script>
{block name="script"}{/block}
</body>
</html>